#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <map>
#include <climits>

using namespace std;
struct P{
    int x,y;
    P(int xx=0,int yy=0):x(xx),y(yy){};
};
bool cmp(P &a,P &b){
    return a.x<b.x;
}
int main(){
    //freopen("in.txt","r",stdin);
    int n;
    cin >>n;
    vector<P> v;
    int a,b;
    for(int i=0;i<n;i++){
        cin >>a >>b;
        v.push_back(P{a,b});
    }
    sort(v.begin(),v.end(),cmp);

    int flag=0;
    for(int i=1;i<n;i++){
        if(v[i].y<=v[i-1].y){
            flag=1;
            break;
        }
    }
    if(flag){
        cout << "true"<<endl;
    }else{
        cout << "false"<<endl;
    }

    return 0;
}